/**
 * 文件名：ToolTaskInfo.java
 *
 * 版本信息：
 * 日期：2014-8-9
 * Copyright 足下 Corporation 2014 
 * 版权所有
 *
 */
package com.hugedata.cdn.service.task.bean;

import java.util.Date;

/**
 * 
 * 项目名称：tool 类名称：ToolTaskInfo 类描述： 创建人：zhaoaihua 创建时间：2014-8-9 下午3:45:53 修改备注：
 * 
 * @version
 * 
 */
public class ToolTaskInfo {

    private String         taskId;

    private String         url;

    private int            port = 80;

    private String         taskType;

    private String         taskStatus;

    private String         creatorId;

    private String         creatorIp;

    private String         creatorFrom;

    private String         creatorClientType;

    private String         measureStautsCode;

    private Date           createTime;

    private ToolAttrBean[] attrs;

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public String getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(String taskStatus) {
        this.taskStatus = taskStatus;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorIp() {
        return creatorIp;
    }

    public void setCreatorIp(String creatorIp) {
        this.creatorIp = creatorIp;
    }

    public String getCreatorFrom() {
        return creatorFrom;
    }

    public void setCreatorFrom(String creatorFrom) {
        this.creatorFrom = creatorFrom;
    }

    public String getCreatorClientType() {
        return creatorClientType;
    }

    public void setCreatorClientType(String creatorClientType) {
        this.creatorClientType = creatorClientType;
    }

    public String getMeasureStautsCode() {
        return measureStautsCode;
    }

    public void setMeasureStautsCode(String measureStautsCode) {
        this.measureStautsCode = measureStautsCode;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public ToolAttrBean[] getAttrs() {
        return attrs;
    }

    public void setAttrs(ToolAttrBean[] attrs) {
        this.attrs = attrs;
    }

    // 0:网页测试 1 HTTP 2 Trace 3 SMTP 4 PING 5 CDN 6 IP反向解析 7 DNS 8 IP/URL定位',
    public String findToolId() {

        String toolId = String.valueOf(taskType);

        if ("0".equalsIgnoreCase(taskType)) {

            toolId = "12";

        } else if ("1".equalsIgnoreCase(taskType)) {

            toolId = "20";

        } else if ("2".equalsIgnoreCase(taskType)) {

            toolId = "21";

        } else if ("3".equalsIgnoreCase(taskType)) {

            toolId = "15";

        } else if ("4".equalsIgnoreCase(taskType)) {

            toolId = "18";

        } else if ("5".equalsIgnoreCase(taskType)) {

            toolId = "00";
        } else if ("6".equalsIgnoreCase(taskType)) {

            toolId = "00";
        } else if ("7".equalsIgnoreCase(taskType)) {

            toolId = "19";
        } else if ("8".equalsIgnoreCase(taskType)) {

            toolId = "19";
        }

        return toolId;
    }

}
